<!--<h1>Добро пожаловать в социальную сеть любителей домашних животных.</h1>-->

<div class="window users" style="width: 320px; margin: 0; float: left;">
    <div class="window-head">
            <p class="window-title">Пользователи</p>
            <a href="/user/all" class="window-link">все</a>
    </div>
    <div class="window-content">
        {foreach from=$randUsers item="user"}
            <div class="user">
                    {assign var="avatarSrc" value=UploadImageFacade::resolveImagePath($user->avatar_id, "84x123")}
                    <a href="/user/{$user->user_id}"><img src="{$avatarSrc}" alt="" /></a><br />
                    <a href="/user/{$user->user_id}" class="name">{$user->name}<br /> {$user->surname}</a>
            </div>
        {/foreach}
    </div>
    <div class="window-bottom-left">
            <div class="window-bottom-right">
            </div>
    </div>
</div>

<div class="window pets" style="width: 320px; margin: 0; float: right;" >
        <div class="window-head">
                <p class="window-title">Любимцы</p>
                <a href="/pet/all" class="window-link">все</a>
        </div>
        <div class="window-content">
                {foreach from=$randPets item="pet"}
                <div class="pet">
                        <a href="/pet/view/{$pet->pet_id}">
                            {assign var="avatarSrc" value=UploadImageFacade::resolveImagePath($pet->avatar_id, "84x123")}
                            <img src="{$avatarSrc}" alt="" width="84" height="123" />
                        </a>
                        <a href="/pet/view/{$pet->pet_id}"><p class="name">{$pet->nickname}</p></a>
                        <a href="">{$pet->type}</a>
                        <a href="">{$pet->race}</a>
                </div>
                {/foreach}
        </div>
        <div class="window-bottom-left">
                <div class="window-bottom-right">
                </div>
        </div>
</div>

<div class="clear-floating"></div>

<div class="window advts" style="width: 100%;">
        <div class="window-head">
                <p class="window-title">Объявления</p>
                <a href="/advertisement/all" class="window-link">все</a>
        </div>
        <div class="window-content">
                {foreach from=$randAdvts item="advt"}
                <div class="advt">
                        <a href="/advertisement/view/{$advt->advt_id}">
                            {assign var="imgSrc" value=UploadImageFacade::resolveImagePath($advt->img_id, "106x77")}
                            <img src="{$imgSrc}" alt="" class="avatar" id="previewUpload" height="77" width="106" />
                        </a>
                        <a href="/advertisement/view/{$advt->advt_id}"><p class="title">{$advt->title|truncate:30}</p></a>
                        <p class="text">{$advt->text|truncate:50}</p>
                        <a href="/advertisement/view/{$advt->advt_id}" class="more">Подробнее</a>
                </div>
                {/foreach}
        </div>
        <div class="window-bottom-left">
                <div class="window-bottom-right">
                </div>
        </div>

</div>



			<div class="window blog" style="width: 319px; float: right; margin-top: 0px;">
				<div class="window-head">
						<p class="window-title">Блоги</p>
						<a href="/post/all" class="window-link">все</a>
				</div>
				<div class="window-content">
						{foreach from=$randPosts item="post"}
						<div class="post">
								<a href="/post/view/{$post->post_id}" class="title">{$post->title}</a>
								<p class="date">{$post->publish_date|date_format:"%e.%m.%Y %H:%M"}</p>
								<p class="text">{$post->short_description|truncate:100:"...":true}</p>
								<a href="/post/view/{$post->post_id}" class="more">Подробнее</a>
						</div>
						{/foreach}
				</div>
				<div class="window-bottom-left">
						<div class="window-bottom-right">
						</div>
				</div>

			</div>

        {userQuestionWidget count=2 mode="main-page"}